package netty.v3.resp;

public class Response<T> {

    private int code;

    private String message;

    private T data;

    private Response(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public class builder{

        private int code;

        private String message;

        private T data;

        public Response build(){
            return new Response(code, message, data);
        }

        public builder setCode(int code) {
            this.code = code;
            return this;
        }

        public builder setMessage(String message) {
            this.message = message;
            return this;
        }

        public builder setData(T data) {
            this.data = data;
            return this;
        }
    }

}
